using System;
using System.ComponentModel.DataAnnotations;

namespace SIOGDE.AccesoDatos.Entidades
{
 public partial class HistorialAscenso
 {
     public HistorialAscenso()
     {
         Guid = System.Guid.NewGuid().ToString();
     }
     #region foreign Keys

     public virtual int GradoId_FK {get;set;}
     private Grado GradoId_obj ;
     public virtual Grado Grado
      {
          get { return GradoId_obj; }
          set {
                GradoId_obj = value;
                if (GradoId_obj != null) GradoId_FK = GradoId_obj.Id; 
          }
      }

     public virtual int PersonaId_FK {get;set;}
     private Persona PersonaId_obj ;
     public virtual Persona Persona
      {
          get { return PersonaId_obj; }
          set {
                PersonaId_obj = value;
                if (PersonaId_obj != null) PersonaId_FK = PersonaId_obj.Id; 
          }
      }
     #endregion
     public virtual int   Id { get; set;}

     
     [StringLength(50, ErrorMessage = "{0} debe tener al menos {2} caracteres.", MinimumLength = 2)]
     [Display(Name = "Guid")]
     public virtual string   Guid { get; set;}

     [Required(ErrorMessage="FechaAscenso es requerido.")]
     //[DataType(DataType.Date)]
     [Display(Name = "FechaAscenso")]
     [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:dd/MM/yyyy}")]
     public virtual DateTime   FechaAscenso { get; set;}

     [DataType(DataType.Date)]
     [Display(Name = "FechaRegistro")]
     public virtual DateTime   FechaRegistro { get; set;}

     [StringLength(100, ErrorMessage = "{0} debe tener al menos {2} caracteres.", MinimumLength = 2)]
     [Display(Name = "Descripcion")]
     public virtual string   Descripcion { get; set;}

     [StringLength(100, ErrorMessage = "{0} debe tener al menos {2} caracteres.", MinimumLength = 2)]
     [Display(Name = "Motivo")]
     public virtual string   Motivo { get; set;}

 
     [StringLength(50, ErrorMessage = "{0} debe tener al menos {2} caracteres.", MinimumLength = 2)]
     [Display(Name = "RegistradoPor")]
     public virtual string   RegistradoPor { get; set;}

     [Required(ErrorMessage="Antiguedad en el Grado es requerido.")]
     [Display(Name = "Antiguedad en el Grado")]
     public virtual int   NumAntiguedad { get; set;}


     [Required(ErrorMessage="Antiguedad en el Arma es requerido.")]
     [Display(Name = "Antiguedad en el Arma")]
     public virtual int NumAntiguedadArma { get; set; }
     

     [Display(Name = "Antiguedad Entre")]
     public virtual int NumEntre { get; set; }    

 }
}

